/*
	The Location class consists of a Point representing
	the x and y coordinates of the Location as well as a String
	with the name of the board.
*/


//Import what we need
import java.awt.Point;

class Location extends Point
{

	//Declare instance variables
	public int board;


	//Constructor that takes in separate x and y values
	//as ints as well as a String for the board name
	Location(int a, int b, int c)
	{
		super(a, b);
		board = c;
	}

	//Constructor that takes in a Point object(containing
	//x and y coords) as well as a String for the baord name
	Location(Point point, int c)
	{
		super(point);
		board = c;
	}

	//Comparison method I threw together that can check the
	//passed values to see if they are the same as the location's
	//Might not be needed, but created to mimic Point class functionality
        boolean equals(Location loc) {
            return equals(loc.x, loc.y, loc.board);
        }

	boolean equals(int a, int b, int c)
	{
		if (x == a && y == b && board == c)
                    return true;
		else
                    return false;
	}

	//Changes all instance variables to those supplied
	void move(int a, int b, int c)
	{
		//Calling Point method to modify x and y
		setLocation(a, b);
		board = c;
	}

	//Returns a String in the format (x,y,board)
	public String toString()
	{
		return "("+x+","+y+","+board+")";
	}
}